<xsl:if test="contains(../@photowidth, 'px') and contains(../@photoheight, 'px') and contains(../style/width, 'px') and contains(../style/height, 'px')">
<xsl:if test="number(translate(../@photowidth, 'px', '')) > 0 and number(translate(../@photoheight, 'px', '')) > 0 and number(translate(../style/width, 'px', '')) > 0 and number(translate(../style/height, 'px', '')) > 0">